<?php

include_once 'connect.php';

$id = $_GET['id'];
$title = $_GET['articletitle'];
if (is_numeric($id)) {
    $sql = "delete from article where id = $id";
    $result = mysqli_query($connect, $sql);
    if ($result) {
        echo "<script>alert('删除文章成功');location.href = 'littleSet.php';</script>";
    } else {
        echo "<script>alert('删除文章失败)';history.back();</script>";
    }
} else {
    echo "<script>alert('参数错误');history.back();</script>";
}